package db;

import java.util.Date;

/**
 * User: SLeeP
 * Date: 28.02.12
 * Time: 19:31
 */
public class Account {
    public String number;
    public int owner;
    public double money;
    public String dateOpened;
    public String dateClosed;

    public Account(String number, double money, String dateOpened, String dateClosed) {
        this.number = number;
        this.money = money;
        this.dateOpened = dateOpened;
        this.dateClosed = dateClosed;
    }

    public void print() {
        if (dateClosed != null) {
            System.out.println(number + " " + money + " " + dateOpened + " " + dateClosed);
        } else {
            System.out.println(number + " " + money + " " + dateOpened);
        }
    }
}
